package com.pan.admin.module.crm.service;

import com.pan.admin.module.crm.entity.CrmDistributeLoanUser;
import com.pan.admin.module.crm.entity.po.CrmLoanUserDistributeStatusPO;
import com.pan.admin.module.crm.entity.qo.CrmLoanUserDistributeStatusQO;
import com.pan.admin.module.crm.entity.vo.CrmAddVo;
import com.pan.admin.module.crm.entity.vo.CrmDistributeLoanUserVO;
import com.pan.admin.module.crm.entity.vo.TreeListVo;
import com.pan.admin.module.loanUser.entity.LoanUserRegister;
import com.pan.admin.module.loanUser.entity.po.LoanUserRegisterTracePO;

import java.util.List;

/**
 * 甲方与用户关联Service接口
 *
 * @author ts
 * @date 2023-11-13
 */
public interface CrmDistributeService {

    /**
     * 根据ID获取列表甲方与用户关联
     *
     * @param id 甲方与用户关联主键
     * @return 甲方与用户关联
     */
    CrmDistributeLoanUser getById(Long id);

    /**
     * 根据渠道用户id查询用户信息
     *
     * @param crmDistributeLoanUserVO
     * @return
     */
    CrmDistributeLoanUserVO getByLoanUserId(CrmDistributeLoanUserVO crmDistributeLoanUserVO);

    /**
     * 查询甲方与用户关联列表
     *
     * @param crmLoanUser 甲方与用户关联
     * @return 甲方与用户关联集合
     */
    List<LoanUserRegister> list(CrmDistributeLoanUserVO crmLoanUser);

    /**
     * 新增甲方与用户关联
     *
     * @param crmLoanUser 甲方与用户关联
     * @return 结果
     */
    int insertLoanJfUser(CrmAddVo crmLoanUser);

    /**
     * 删除甲方与用户关联
     *
     * @param id 甲方与用户关联主键
     * @return 结果
     */
    int deleteById(Long id);

    /**
     * 批量删除甲方与用户关联
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int batchDeleteById(Long[] ids);

    /**
     * 树控数据 左边
     *
     * @param crmLoanUser
     * @return
     */
    TreeListVo treeLeftList(CrmDistributeLoanUserVO crmLoanUser);

//    /**
//     * 树控数据
//     *
//     * @param crmLoanUser
//     * @return
//     */
//    TreeListVo treeList(CrmDistributeLoanUserVO crmLoanUser);

    /**
     * 左树节点渲染(子节点点击)
     */
    TreeListVo treeListChildren(CrmDistributeLoanUserVO crmLoanUser);

    /**
     * 获取CRM用户列表分配状态
     *
     * @param crmLoanUserDistributeStatusQO
     * @return
     */
    List<CrmLoanUserDistributeStatusPO> listUserDistributeStatus(CrmLoanUserDistributeStatusQO crmLoanUserDistributeStatusQO);

    /**
     * 修改用户跟踪
     */
    int updateLoanUserRegisterTrace(LoanUserRegisterTracePO loanUserRegisterTracePO);
}
